using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Iacym.Entities;

namespace Iacym.Repository.Mapping
{
    public class LINEA_TELEFONICAMap : EntityTypeConfiguration<LINEA_TELEFONICA>
    {
        public LINEA_TELEFONICAMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Descripcion)
                .IsRequired()
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("LINEA_TELEFONICA");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Descripcion).HasColumnName("Descripcion");
        }
    }
}
